package com.openget.lang;

import java.util.concurrent.*;

public final class ElementHelper {
    
	public static void execute(ElementModel[] elements, OpengetContext context) {
    	for (int i = 0; i < elements.length; i++)
    		elements[i].execute(context);
    }
    
	public static void into(ElementModel element, OpengetContext context) {
		into(element, new OpengetContext[] { context });
	}
    
	public static void into(ElementModel element, OpengetContext[] contexts) {
		ElementModel[] strategys = ElementLocator.getStrategys(element);
		for (int i = 0; i < contexts.length; i ++)
	    	ElementHelper.execute(strategys, contexts[i]);
    }

	public static <T> Callable<T> getCallable(ElementModel element, OpengetContext context, Class<T> clazz) {
		return null;
	}
}